#include<stdio.h>
int main()
{
double sum1=0,i=1,n=20,t=1;
for (n= 1; n<20; n++)
    {
   for ( i = 1; i <n; i++)
    {
    t=t*i;
    }
    sum1=t+sum1;
    }
    printf("sum1 is %22.15e",sum1);
    
}